#ifndef _LUA_HOOK_H
#define _LUA_HOOK_H

class LuaHookMgr : public Single<LuaHookMgr>, public IEventReceiver
{
	lua_State* state;
	list<string> m_functions[NUM_HOOKS];
public:
	LuaHookMgr(lua_State* st) : state(st)
	{
	}
	void OnCharLogin(Player* plr);
	void OnAreaChanged(ui32 areaid, Player* plr);
	void OnCharDelete(Player* plr);
	void OnNewChar(Player* plr);
	bool OnAccountLogin(const char* accname, const char* ip);
	void RegisterHook(ui32 hooktype, string funcname);
};

#define sLuaHook (*LuaHookMgr::getSingle())

#endif _LUA_HOOK_H